package com.cn.designpatterns.ex.concrete.template;

import java.util.Arrays;

/**
 * @author zhangyi
 * @date 2018/12/24 15:54
 */
public abstract class Template implements ITemplate{

    private Object[] array;

    public Template(Object[] array) {
        this.array = array;
    }
    @Override
    public void printSort(){
        sort(array);
        Arrays.asList(array).stream().forEach(System.out::println);
    }

    public final void endOperate(){
        printSort();
    }
}
